package com.jjyu.controller;

import com.jjyu.entity.Feedback;
import com.jjyu.service.FeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/feedback")
public class FeedbackController {

    @Autowired
    private FeedbackService feedbackService;

    @PostMapping("/recommendations")
    public Feedback submitRecommendationFeedback(@RequestBody Feedback feedback) {

        // 调用service层的方法保存反馈
        return feedbackService.saveFeedback(feedback);
    }
}